package com.kll.carolinehmibiz.presentation.listener

import java.io.File

interface NewContactProtocol {

    interface IView {
        // 添加家人成功
        fun addFamilySuccessed()
        // 添加家人失败
        fun addFamilyFailed(code: Int, message: String)
        // 编辑家人成功
        fun editFamilySuccessed()
        // 编辑家人失败
        fun editFamilyFailed(code: Int, message: String)
        // 删除联系人成功
        fun delFamilySuccessed()
        // 删除联系人失败
        fun delFamilyFailed(code: Int, message: String)
        // 上传头像成功
        fun uploadHeadImgSuccessed(path: String)
        // 上传头像失败
        fun uploadHeadImgFailed(code: Int, message: String)
    }

    interface IPresenter {
        /**
         * 添加家人
         *
         * @param mobile 手机号
         * @param avatar 头像url
         * @param firstName 姓氏
         * @param lastName 名
         * @param remark 备注
         */
        fun addFamily(mobile: String, avatar: String, firstName: String, lastName: String, remark: String)

        /**
         * 编辑家人
         *
         * @param familyId 家人ID
         * @param mobile 手机号
         * @param avatar 头像url
         * @param firstName 姓氏
         * @param lastName 名
         * @param remark 备注
         */
        fun editFamily(familyId: Int,  mobile: String, avatar: String, firstName: String, lastName: String, remark: String)

        /**
         * 删除联系人
         */
        fun delFamily(familyId: Int)

        /**
         * 上传头像
         */
        fun uploadHeadImg(file: File)

    }

}